package ar.edu.unlp.info.tesis.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

@Entity
@Table(name="ATTACHMENT")

public class Attachment extends Entidad{

	private long id;
	
	@Column(name="NAME")
	private String name;
	
	@Column(name="DESCRIPTION")
	private String description;
	
	@Column(name="LENGTH")
	private int length;
	
	@Column(name="FILE_URL")
	private String fileURL;

	@Column(name="SHA2")
	private String sha2;
	
	@Column(name="CONTENT_TYPE")
	private String contentType;
	
	public String getContentType() {
		return contentType;
	}
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	
	@Id
	@GeneratedValue
	@JsonIgnore
	@Column(name="ID", unique=true, nullable=false)
	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public String getFileURL() {
		return fileURL;
	}
	public void setFileURL(String fileURL) {
		this.fileURL = fileURL;
	}
	public String getSha2() {
		return sha2;
	}
	public void setSha2(String sha2) {
		this.sha2 = sha2;
	}
}
